const state = {
    authToken: null
};

const mutations = {
    setKey(state, key) {
        // Vue.set(state,'authToken',key)
        state.authToken = key;
        console.log(state.authToken);
    }
};

const actions = {
    setKey({ commit }, key) {
        commit('setKey', key);
    }
};

const getters = {
    // authToken: state => state.authToken;
    getKey(state)
    {
        return state.authToken;
    }
};

export default {
    state,
    mutations,
    actions,
    getters
};
